package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author sqj88
 * @date 2018/2/5 15:15
 */
@Entity
@Table(name = "l2r_yh_package_sale_detail")
@DynamicInsert
public class L2RYhPackageSaleDetail extends BaseEntity {
    private String l2RMemberNo;
    private String orderNo;
    private String resultInfo;

    @Basic
    @Column(name = "l2r_member_no", nullable = false, length = 32)
    public String getL2RMemberNo() {
        return l2RMemberNo;
    }

    public void setL2RMemberNo(String l2RMemberNo) {
        this.l2RMemberNo = l2RMemberNo;
    }

    @Basic
    @Column(name = "order_no", nullable = true, length = 32)
    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    @Basic
    @Column(name = "result_info", nullable = true, length = -1)
    public String getResultInfo() {
        return resultInfo;
    }

    public void setResultInfo(String resultInfo) {
        this.resultInfo = resultInfo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RYhPackageSaleDetail that = (L2RYhPackageSaleDetail) o;

        if (l2RMemberNo != null ? !l2RMemberNo.equals(that.l2RMemberNo) : that.l2RMemberNo != null) return false;
        if (orderNo != null ? !orderNo.equals(that.orderNo) : that.orderNo != null) return false;
        if (resultInfo != null ? !resultInfo.equals(that.resultInfo) : that.resultInfo != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = l2RMemberNo != null ? l2RMemberNo.hashCode() : 0;
        result = 31 * result + (orderNo != null ? orderNo.hashCode() : 0);
        result = 31 * result + (resultInfo != null ? resultInfo.hashCode() : 0);
        return result;
    }
}
